package com.mryang.ladder;

import java.util.Scanner;

/**
 * @ClassName knight
 * @Description TODO 打印沙漏
 * @Author Genius
 * @Date 2021/1/17 23:07
 */
public class printTheHourglass {
    public static void main(String[] args) {
        Scanner scr = new Scanner(System.in);
        int number = scr.nextInt();
        char signal = scr.next().charAt(0);

        int num = (int)Math.sqrt((number + 1)/2.0);
        for (int i = num; i > 0; i--) {
            for (int j = 0; j < num-i; j++) {
                System.out.print(" ");
            }
                for (int k = 2*i-1; k > 0; k--) {
                    System.out.print(signal);
                }
            System.out.print("\n");
        }
        for (int i = 2; i <= num ; i++) {
            for (int j = 0; j < num-i; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j < 2*i-1; j++) {
                System.out.print(signal);
            }
            System.out.print("\n");
        }
        System.out.println(number-(2*num*num-1));
    }
}
